package com.yufei.infoExtractor.extractor.fetchdecision;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.yufei.infoExtractor.context.HActionContext;

public class DecideByIsHadFetched implements DecisionMaker {
	private static final Log mLog = LogFactory.getLog(DecideByIsHadFetched.class);
	private static DecisionMaker decisionMaker=null;
    public  static DecisionMaker  getInstance(){
    	if(decisionMaker==null){
    		decisionMaker=new DecideByIsHadFetched();

    	}
    	return decisionMaker;
    }
	private DecideByIsHadFetched() {
		super();
		// TODO Auto-generated constructor stub
	}

	@Override
	public boolean makeDecision(HActionContext context, String currentUrlStr) {
		// TODO Auto-generated method stub
	if(context.getIsRepetive().isRepetive(currentUrlStr)){
		return false;
	}
	else{
		return true;
	}
	}

}
